package leetcode_2501_2600;

import java.util.ArrayList;
import java.util.List;

public class LeeCode_2553 {
    public static void main(String[] args) {

    }
    private static int[] separateDigits(int[] nums) {
        int n = nums.length;
        List<Integer> list = new ArrayList<>();
        for (int num : nums) {
            StringBuilder sb = new StringBuilder();
            while (num != 0){
                int ge = num % 10;
                num /= 10;
                sb.append(ge);
            }
            sb.reverse();
            for (int i = 0; i < sb.length(); i++) {
                list.add(sb.charAt(i) - '0');
            }
        }
        int[] ans = new int[list.size()];
        for (int i = 0; i < list.size(); i++) {
            ans[i] = list.get(i);
        }
        return ans;
    }
}
